Skip to content

Fix the include guard of transform_inclusive_scan.hpp - #136

Open
ZheFeng7110 wants to merge 1 commit into
boostorg:developfrom
ZheFeng7110:fix/inc-guard
Open

ZheFeng7110 wants to merge 1 commit into
boostorg:developfrom
ZheFeng7110:fix/inc-guard

Conversation

@ZheFeng7110

Copy link
Copy Markdown

boost/algorithm/cxx17/transform_inclusive_scan.hpp uses the include guard of
transform_reduce.hpp (BOOST_ALGORITHM_TRANSFORM_REDUCE_HPP). In a translation
unit that includes both headers, whichever comes second is skipped and its
algorithm is not declared:

#include <boost/algorithm/cxx17/transform_reduce.hpp>
#include <boost/algorithm/cxx17/transform_inclusive_scan.hpp>

int main() {
    int in[3] = {1, 2, 3}, out[3];
    boost::algorithm::transform_inclusive_scan(in, in + 3, out, std::plus<int>(),
                                               [](int x) { return x * x; });
}
// error: no member named 'transform_inclusive_scan' in namespace 'boost::algorithm'

(Reproduced with Boost 1.92.0 and 1.93.0.beta1; with the includes swapped,
transform_reduce is the one that disappears.)

This is the same copy-paste as the one fixed in inclusive_scan.hpp by 8c26a50
(#81). Both files were copied from transform_reduce.hpp in 334737e, and that
fix did not cover transform_inclusive_scan.hpp. The existing tests include one
header each, so neither case was caught.

It reused transform_reduce.hpp's guard (copied with the file, as
inclusive_scan.hpp's was until 8c26a50), so a translation unit that
included both lost the second one's algorithm. Also correct the \file
and \brief comments of both copied headers
ZheFeng7110 added a commit to ZheFeng7110/boost-m that referenced this pull request Nov 12, 2026
What PR mcpplibs#5's suites found that main already had (checked against
origin/main's exports), what remains open, and the upstream Boost
problems they surfaced, each checked against 1.93.0.beta1 rc1
(f976a2b, built and run with clang 23 on both releases) and the
upstream trackers: only container's include guard, decimal's
logb/ilogb and decimal's documentation names are fixed there; the
algorithm include guard is boostorg/algorithm#136. Also records two
wrong exclusion reasons in tests/math/coverage.toml and Boost.Math's
own module in 1.93.
ZheFeng7110 added a commit to ZheFeng7110/boost-m that referenced this pull request Nov 19, 2026
What PR mcpplibs#5's suites found that main already had (checked against
origin/main's exports), what remains open, and the upstream Boost
problems they surfaced, each checked against 1.93.0.beta1 rc1
(f976a2b, built and run with clang 23 on both releases) and the
upstream trackers: only container's include guard, decimal's
logb/ilogb and decimal's documentation names are fixed there; the
algorithm include guard is boostorg/algorithm#136. Also records two
wrong exclusion reasons in tests/math/coverage.toml and Boost.Math's
own module in 1.93.
ZheFeng7110 added a commit to mcpplibs/boost-m that referenced this pull request Nov 21, 2026
… fixes (#5)

* docs(agents): design the module test hardening for 34 popular libraries

* Modularize Boost.Conversion; export boost::core::string_view; fix the transform_reduce include guard

The prefix heuristic saw no headers for conversion (its headers sit at the
top of boost/), so the library had no module and its casts were exported
by range and graph. EXTRA_HEADERS gives it its three headers, ownership and
include edges; pointer_cast.hpp is smart_ptr's so conversion does not claim
smart_ptr's names. range, graph and statechart now import the conversion
module instead of re-exporting the casts.

core's header set adds boost/core/detail/string_view.hpp, the only header of
the documented boost::core::string_view; no module exported the alias
before (json exported only basic_string_view).

patches/algorithm.patch: transform_inclusive_scan.hpp reused the include
guard of transform_reduce.hpp, so transform_reduce was missing from the
algorithm module and from any TU that includes both headers.

mcpp.toml also gains [dev-dependencies] compat.doctest and the [test]
discover globs of the test hardening.

* tests: move the smoke tests of 34 libraries under tests/<lib>/, add doctest suites

Each library of the hardening gets tests/<lib>/ (smoke.cpp is the former
tests/<lib>.cpp); examples*.cpp port the official examples, api*.cpp the
documented components, custom_types.cpp the user-type suite, and
include_*.cpp the macro API as plain #include TUs. coverage.toml maps every
example and documentation snippet of the 1.92.0 release to a test case or
a reason (tools/ci/test_coverage.py scan/link/check).

First libraries: algorithm, any, callable_traits, charconv, circular_buffer,
compat, conversion, core, crc, dynamic_bitset, variant2.

tests/dll/ and tests/test/utf/ are test projects of their own (plugins; the
compiled Boost.Test form), excluded from the root [test] discover.

* convert: export the converters and throw_on_failure; tests for uuid, container_hash, convert

The converter headers (stream, lexical_cast, strtol, printf, charconv) are
not self-contained, so the standalone-compile filter had dropped them and
the convert module exported convert() without a converter. They now follow
<boost/convert.hpp> in an explicit GMF ([convert] in export_policy.toml);
spirit.hpp stays header-only (it would make Spirit's whole surface
convert's). Four boost::parameter internals that graph and heap exported
move to convert, which now reaches Boost.Parameter first.

patches/convert.patch makes boost::throw_on_failure inline constexpr: as a
namespace-scope const object it had internal linkage and could not be
exported.

New suites: uuid (every documented component), container_hash (official
examples; described classes through the module and as headers), convert
(examples grouped by the default converter they define, user converters).

* bimap: export the _key/_data lambda placeholders; port the 27 official examples

patches/bimap.patch turns the anonymous-namespace references of
boost/bimap/support/lambda.hpp into inline constexpr (as lambda's _1), so
the bimap module exports them.

The examples run as doctest cases whose output must equal the original
program's, built from upstream/boost alone with clang++; examples that
combine bimap with assign, lambda, property_map, range or serialization use
those modules, and the foreach / typeof / xpressive ones are a pure-include
TU. api.cpp covers the inline tutorial code, custom_types.cpp user keys,
comparators, hashers, tags and info payloads.

* tests: bloom, describe and container_hash suites; example ports with an output oracle

bloom: the tutorial section by section, every subfilter, user hashers and
allocator; genome.cpp runs the k-mer example on a FASTA fixture instead of
the 140 MB download. describe: all non-fmt examples (the json and
serialization ones with the BOOST_DESCRIBE_* macros included before the
module imports) and the class/enum pages over user types. container_hash:
every customization point (hash_value by ADL, boost::hash specialization,
is_range / is_tuple_like / is_unordered_range).

Ported example programs compare their output with an oracle: the same
ported code compiled from upstream/boost headers alone with clang++.
test_coverage.py link also maps <page>#example_<stem> sections to the
example's case.

* tests: hash2 suite (11 examples, every algorithm, hash_append over each kind, user types/algorithms/flavors)

* tests: unordered suite (example, documentation sections, concurrent visitation, stats as headers, user types)

* container: fix the pmr/devector.hpp include guard; container suite

patches/container.patch: boost/container/pmr/devector.hpp reused the include
guard of pmr/vector.hpp, so the module (whose GMF includes devector first)
never exported boost::container::pmr::vector / vector_of.

The 19 examples (output oracle), the documentation's inline code (hub,
devector, stable_vector, pmr, const-reference parameters, null iterators),
user types, options and a user memory_resource. doc_extended_allocators is
recorded as a gap: the package does not build the dlmalloc TUs.

* regex: inline constexpr message tables (module consumers saw null strings); regex suite

patches/regex.patch (M5) had moved the function-local static tables of
regex_traits_defaults.hpp to namespace-scope arrays with internal linkage.
In a TU that imports the regex module, gcc gives those tables a local,
uninitialized copy: get_default_error_string() returned nullptr and every
invalid expression threw std::logic_error (string from null) instead of
regex_error; collating names ([[.space.]]) failed alike. The tables are
inline constexpr now: external linkage and COMDAT, so the original
multiple-definition problem stays solved.

Suite: 17 examples (fixture files on the command line, fixed stdin, grep
over program_options), the reference pages' inline examples, user traits,
iterators, allocators, formatters and grep callbacks.

* url: export the charsets and grammar rules (BOOST_INLINE_CONSTEXPR); url suite

patches/url.patch: Boost.URL's character sets and grammar rules
(grammar::alnum_chars, digit_chars, unreserved_chars, uri_rule,
authority_rule, ...) were namespace-scope constexpr objects, which have
internal linkage and cannot be exported; the url module lacked all 19. They
are BOOST_INLINE_CONSTEXPR now, as upstream already spells
absolute_uri_rule.

Suite: the six command-line examples (output oracle, documented arguments,
fixtures), the documentation's unit files (snippets, grammar, 3_urls) run
through a doctest shim of Boost.URL's test macros, and user rules, charsets
and string tokens.

* json/container: export the kind tags and the placement new; json suite

patches/json.patch: BOOST_JSON_INLINE_VARIABLE declared object_kind,
array_kind and string_kind as references in an anonymous namespace; they
are inline constexpr now, so the json module exports them.

container: allocator_traits::construct uses the global
operator new(std::size_t, void*, boost_container_new_t); a consumer that
instantiates it (pmr::vector<json::value>::resize) could not see it. The
policy exports the tag and the placement operators, and gen_exports.py
accepts namespace = "" (the global namespace) for [[<lib>.extra]].

Suite: the json documentation's code files (test/snippets.cpp and
doc_*.cpp, which the pages include) through a doctest shim, the examples
(output oracle; the parse_into* timing benchmarks excluded), user types via
tag_invoke and contexts, described types (describe headers + json module).

* tests: platform-independent expectations (MSVC ABI, demangled names, temp paths)

The MSVC ABI compresses one empty base only, so two sizeof checks of
empty_value hold elsewhere; demangled names are matched in a form both ABIs
print; describe's string_to_enum output (a typeid name) is compared off
MSVC only; and the ported command-line examples name their fixtures
relative to the temporary directory, which they make current, since the
output prints the path (macOS's temporary directory is not /tmp).

* decimal: std::format of decimal types through the module; decimal suite

The decimal facade's GMF declared no std::formatter specializations:
boost/decimal/format.hpp provides them only when __cpp_lib_format is
defined, and nothing had included <version> yet. The GMF now starts with
<version>, and unexported aliases in the purview name the six
specializations so a consumer's std::format reaches them.

Suite: the examples (output oracle; configuration macros taken from the
headers that define them), the six type pages section by section, cmath /
charconv / strings / cfenv / format pages (several of the pages' names and
values differ from 1.92 and are noted), and user generic code, a money
type and decimal keys.

* tests: harden asio (all official examples, overview and requirements pages)

- asio: the self-contained examples (cpp11/14/20) and the network ones over
  loopback in one process (servers in a background thread against a harness
  client, clients against their ported server), the overview pages and the
  requirements pages as user types (completion token, buffer sequences,
  executor, services, random-access devices); 171 examples covered, 18
  excluded with reasons (ssl, spawn, windows, fork, icmp, multicast, ...)
- asio module: export experimental::use_promise (use_promise.hpp is not
  self-contained upstream, so the standalone filter had dropped it) and the
  stream_errc / socket_errc namespaces (using-declarations only)
- regex: the POSIX C API, basic/extended syntax and error_type pages
- convert: the remaining pages, plus a transforming converter (other.qbk)
- test_coverage.py: quickbook code blocks are indented by any amount, not
  4+ spaces; inventories rescanned

* docs(agents): record the progress of the module test hardening

Progress per library, where the implementation departs from the design,
the methods used (example ports with an output oracle, loopback harness),
the wrapper defects the tests found, the open CI failures and the remaining
work.

* tests: fix the CI legs (clang operator new, Windows, aarch64, asio timing)

container: the `using ::operator new;` export added for the json docs
re-exports every global operator new; on clang, libc++'s aligned allocation
inside another module's instantiation (tests/statechart.cpp) became
ambiguous. The export is gcc-only now; on clang src/json.cppm names the
placement operator in its purview so it stays reachable from its GMF.

asio: the deferred examples print no-error through ex_message() ("Success";
the C library's text differs on musl, macOS and Windows); the actor benchmark
passes its token 500k times instead of 50M (it timed out on loaded CI
runners); type_erasure/main, connect_pair and the fd-passing pair are
compiled only where asio has POSIX stream descriptors / socketpair /
sendmsg, and the doc case for connect_pair skips Windows.

decimal: `near` is a macro of <windows.h> (renamed close_to); the
decimal_fast128_t -> long double check is skipped where long double has
113 bits — an upstream bug, reproduced from upstream/boost alone with
clang -mlong-double-128.

json: the doc files no longer #include <array> after the imports (MSVC STL
headers cannot be re-included after an import reached them).

* tests/asio: POSIX-only local sockets, prioritised_handlers output, Windows case names

The local/ examples (UNIX domain sockets) are compiled on POSIX systems
only: Windows has AF_UNIX stream sockets but bind fails on the CI hosts
(WSAEOPNOTSUPP). The pipe that stands in for stdin is POSIX-only in every
network file (it returned a descriptor as int). prioritised_handlers'
output depends on whether the accept has completed when the queue first
runs, so it is not compared. On Windows each case's name goes to stderr
before it runs, to tell which case ends a process without a report.

* beast: export beast::errc; beast suite

boost/beast/core/error.hpp declares `namespace errc = boost::system::errc;`.
The generator collects entities and a using-declaration cannot name a
namespace alias, so the policy re-declares it in the module.

Suite: the HTTP and WebSocket examples over the loopback interface (output
oracle; harness clients written with Beast: a GET of a document root's
index.html, one WebSocket message), the reference pages' inline code over
beast::test::stream (primer messages, body types, serializer and parser
stream operations, chunked encoding with the page's chunk-callback output,
the RFC 6455 handshake key/accept pair, the Body and BuffersGenerator
concepts), and user types: a Body with reader and writer, Fields with a user
allocator, a DynamicBuffer, and a next layer with its own teardown,
async_teardown and beast_close_socket overloads. SSL examples need OpenSSL,
the coroutine ones asio::spawn (Boost.Context) and two clients public
internet services; they are excluded.

* tests/asio, beast: Windows doc root, macOS local probe, timer5, composed_4

The served index.html is written in binary mode (Windows wrote \r\n and
the Content-Length differed). The local-socket probe stays open like the
TCP one: on macOS an accept of a connection the peer already closed fails
with EINVAL and the beast async-local servers stop. tutorial/timer5 runs two
threads whose timers are due at the same instant, so its output is not
compared; composed_4 ends the process on windows-llvm-msvc (0xC0000374) and is
POSIX-only until that is understood. The oracle reruns a program whose free
port was taken in between.

* cobalt: no main.hpp in the module, exported tags and protocols; cobalt suite

boost/cobalt.hpp includes boost/cobalt/main.hpp, which defines the
program's main as a friend of main_promise. From the module's GMF that
definition reached every importer and clang rejected a consumer's own
`int main(int, char**)`. The facade has cobalt.hpp's headers except
main.hpp (policy gmf); a co_main program includes <boost/cobalt/main.hpp>.

patches/cobalt.patch: use_op, use_task, this_coro::allocator / cancelled /
initial and the cobalt::io protocol constants (tcp_v4, udp, local_stream,
...) were namespace-scope constexpr objects (internal linkage, not
exported); they are inline constexpr. cobalt::this_coro re-exports the
asio::this_coro names its using-directive brings in (policy extra).

Suite: the examples (output oracle against the cobalt sources; co_main
becomes a task<int> run by cobalt::run, echo_server on a free port), the
documentation's code (background, benchmarks, design, primer, tour, push
generator) and user types: an awaitable, an interruptible awaitable in race,
a cobalt::op, move-only results through task/promise/generator/channel/join,
and a user executor for cobalt::spawn.

* tests: mqtt5 suite against an in-process broker

The examples talk to broker.hivemq.com; here a small MQTT 5 broker of the
test harness (CONNECT, PUBLISH at QoS 0-2, SUBSCRIBE with wildcards and
retained messages, UNSUBSCRIBE, PING, DISCONNECT; TCP or WebSocket) listens
on a free port passed as argv. The programs that run until SIGINT stop as on
SIGINT after their first message or fifth completion. The broker's CONNACK
carries a property: the client reads a property-less CONNACK's remainder with
a zero-size read, which a websocket::stream completes only on the next
frame. The documentation's snippets run against the same broker; user
types: a stream layer with its async_shutdown, a logger, an authenticator.
The TLS examples need OpenSSL and are excluded.

* wrapper: geometry, math, interprocess, variant, config, dll export fixes found by the suites

- geometry: GMF without adapted/boost_fusion.hpp (fusion and tuple adaptation
  both visible are ambiguous), with io/svg/svg_mapper.hpp; the facade imports
  algorithm; clang reaches the placement operator new through the facade;
  core drops std::size (ambiguous with boost::size)
- variant.patch: name the struct in has_result_type.hpp (gcc 16 ICE on every
  rtree use)
- interprocess.patch: creation tags, lock options, offset_type_alignment and
  ec_table as BOOST_INLINE_CONSTEXPR (TU-local otherwise)
- math.patch: float/double/long_double_constants and the nonfinite facet flags
  inline constexpr; cubic_roots / line_search_policies name std::sin / fabs
- config_cstdlib.patch + libs.json: boost/cstdlib.hpp in the config module,
  exit_success / exit_failure / ... as BOOST_INLINE_CONSTEXPR
- dll: boost::dll::fs is a using-directive upstream, invisible to importers;
  policy extra re-declares the filesystem names the documentation uses
- cobalt: sctp protocols only where IPPROTO_SCTP exists (Windows)

* tests: geometry suite (examples, doc snippets, custom types)

Official examples ported with output oracles, partitioned so that no two
examples with conflicting registrations share a program; they run in the
temporary directory (svg / data files). api_reference / api_index cover the
documentation pages, custom_types the traits and registration macros.

* tests: math suite (examples, doc pages, custom types)

Examples in four ported programs (each case restores the classic global
locale; plots and data files go to the temporary directory); outputs with
seeds, timings, libm digits or library message text are not compared.
Excluded: examples needing GMP / quadmath / Eigen / lodepng, ./.temps/ of the
upstream test tree, and double_exponential (crashes as published). Policy-
macro examples and the C99/TR1 pages are gaps. doc_* cover the documentation
pages; custom_types a user real type, error policy and functors.

* tests: Boost.Test documentation and examples as whole programs

Each doc example (libs/test/doc/examples) and libs/test/example program is a
test program: the original main renamed, a harness that runs it with the
documented command line and compares the output (times, source locations
normalised) with a clang oracle and the expected exit status. test_coverage.py
treats a file defining main as the case "program". custom_types covers the
printing, dataset, fixture, precondition, formatter and tolerance points.

* tests/dll: plugin shared libraries and the dll tutorials

Seven plugin packages (kind = "shared") built next to the test programs;
examples.cpp runs the importers against them, self.cpp the tutorials that
import from the program itself (-rdynamic), custom_types user types across the
boundary. The package is linked shared (Mach-O / PE refuse a static copy
reached by the program and the plugins). tutorial8_static is a gap:
this_line_location() is static inline upstream.

* tests/asio family: hang watchdog, peer ignores backlog resets, cobalt spsc

A doctest listener reports a case still running after 60 s (and prints case
names on Windows), so a CI timeout names the hanging example. The connecting
peer of the composed_* examples does not count a connection reset before any
data: it landed in the backlog of the previous server's closing acceptor and
left the next server waiting (composed_6 under load). cobalt's spsc passes
100 thousand values, not 100 million (the CI timeout).

* ci, docs: coverage check job, sub-project step, tests/ layout

The 'example coverage' job runs tools/ci/test_coverage.py check; group A of
each host runs mcpp test in tests/dll and tests/test/utf. docs/architecture
describes tests/<lib>/ and the two sub-projects.

* tests: macOS, Windows and aarch64 fixes from CI

- Boost.Test and dll custom types: namespace app, not user (macOS
  <sys/proc.h> declares struct user); numeric_limits (min)/(max) (windows.h)
- geometry/api_reference: close_to, not near (Windows macro)
- math examples: outputs compared on the oracle's platform (x86_64 Linux)
  only; elsewhere long double's width and libm digits differ
- math docs: tgamma(5000) overflows in every type (aarch64's long double);
  the ooura cosine tolerance; daubechies_scaling with an explicit grid;
  naive_monte_carlo with the lambda's type, as the page writes it
- asio parallel_group examples: output compared only where POSIX stream
  descriptors exist (an empty main elsewhere)
- Boost.Test programs: normalise colour codes, 'unknown location', the
  system's memory-fault text and MSVC's class-key in type names; example83's
  std::rand output not compared; sizeof(long) and SIGALRM outputs not
  compared on Windows
- cobalt/doc names each case on Windows (heap corruption ends the process)

* tests: cobalt spsc excluded, Windows-only crashes skipped, ooura check

- cobalt spsc: its awaitable queue races (await_suspend stores the executor
  and handle unsynchronised with the other thread's post); it crashed on
  aarch64 and can hang. Excluded with the reason.
- cobalt/doc asio-awaitable / a-minimal-executor and math daubechies_scaling
  end the process on windows-llvm-msvc only (heap corruption / SIGSEGV, like
  asio's composed_4): skipped there, an open issue in the design record.
- math ooura cosine: the result must lie within the integrator's own error
  estimate (with the values in the report)

* tests: cobalt/doc skipped on Windows, ooura cosine on 113-bit long double

- cobalt/doc ends with heap corruption on windows-llvm-msvc at a different
  case each run (a-minimal-executor, race): the whole program is skipped
  there (a test-suite decorator), an open issue in the design record
- ooura_fourier_cos<double> returns NaN on aarch64 Linux (its nodes are
  computed in the 113-bit long double): that check is skipped there

* tests, ci: asio timer measurement, tutorial9 typedef, tests/dll not on Windows yet

- asio/api_overview: read the clock before constructing the timer (its
  expiry counts from construction; a loaded runner measured < 5 ms)
- dll/self tutorial9: the function type spelt as the original's typedef
  (clang-cl misparsed the alias)
- CI: tests/dll is not run on Windows: the package built shared does not
  export its compiled sources on PE (undefined boost::filesystem /
  boost::system symbols); open issue in the design record

* ci: tests/dll not on the static musl arm64 target

gcc@16.1.0 on Linux arm64 targets aarch64-linux-musl with a static C
library; a static program cannot load the plugin shared libraries.

* docs: module test hardening record landed; open issues as a todo

§11 records the progress (every library's todo cleared), the deviations
(dll linkage, Boost.Test as whole programs), the wrapper-layer issues the
suites found, the CI timings (§9 Q3: no further test grouping) and the
open issues, which move to todos/module-tests-open-issues.md.

* exports, tests, ci: review fixes for PR #5

- smart_ptr owns boost/pointer_cast.hpp in its GMF (EXTRA_HEADERS +
  libs.json), so the raw-pointer / std::unique_ptr / std::shared_ptr
  overloads of *_pointer_cast are exported again (by smart_ptr); ownership
  alone had left them exported by no module. Regression case in
  tests/conversion/api.cpp.
- export_policy: heap and graph re-export the Boost.Parameter names their
  named-parameter APIs rest on (convert's wider GMF had claimed them).
- export_policy [convert]: why the math edge is kept (pass-2 body edge).
- docs/usage.md: core does not export boost::size (ambiguity with Range).
- tools/ci/test_coverage.py: qbk sections keep their own body across nested
  sections; `----` is a fence only in .adoc; dead SUBPROJECTS / top removed.

* docs(agents): findings of the module tests and the upstream Boost bugs

What PR #5's suites found that main already had (checked against
origin/main's exports), what remains open, and the upstream Boost
problems they surfaced, each checked against 1.93.0.beta1 rc1
(f976a2b, built and run with clang 23 on both releases) and the
upstream trackers: only container's include guard, decimal's
logb/ilogb and decimal's documentation names are fixed there; the
algorithm include guard is boostorg/algorithm#136. Also records two
wrong exclusion reasons in tests/math/coverage.toml and Boost.Math's
own module in 1.93.

* tools: example porting scripts in tools/port_tests

The generators of the ported upstream tests (port_examples.py, the
per-library regen scripts, the harness headers) were only in the local
.tmp/scripts/. They are now tools/port_tests/, driven by regen.py, which
extracts the pinned release's libs/ into target/port-tests/, applies the
edited example sources (sources/*.patch), builds the oracle libraries and
runs the libraries in parallel, summarising the FLAG lines.

Regenerating reproduces the committed tests/ except the outputs that are
never compiled (#if !(1): timings, dates, thread order) and bloom and
container, which predated the current porter and are regenerated here.
Fixes on the way: several --output-unless of one example nest; math keeps
each example in the file that has it; CLANG_NO_DEFAULT_CONFIG is dropped
for the oracle. test_coverage.py link also matches example: <dir>/<stem>.

Design record 2026-11-18-port-tests-tools-design.md; the todo item is done.

* tests: fix the windows-llvm-msvc process crashes (two clang module defects) (ZheFeng7110#1)

* ci(experiment): reproduce the windows-llvm-msvc crashes under page heap

Builds asio/examples_cpp20, cobalt/doc and math/doc_sf on windows-latest
with the Windows skips removed, prints the effective compile/link flags,
runs each program plainly and then under full page heap in cdb (open
issue 1 of the module tests). Experiment only; dropped before merging.

* ci(experiment): minimal programs, cdb at the heap-corruption stop

tests/zz_repro/: the same std cases (std::async, exception_ptr, promise
set_exception, threads) with textual headers, with import std only and
with the asio module, plus asio's use_future; each case runs in its own
process. The crashing programs run under cdb without page heap so the
0xC0000374 stop shows the freeing stack; the MSVC STL ambient scheduler
definitions are printed. Experiment only.

* ci(experiment): page heap per case, CatchableType and ambient-scheduler symbols

* ci(experiment): llvm 22.1.8 vs 23.1.3, decorated CatchableType names, TU-local throw workaround

* tests: complete the MSVC-ABI CatchableTypes in the TUs that copy exceptions

clang on the MSVC ABI leaves the copy constructor out of the CatchableTypes
it emits for a throw that came from a named module unless the TU checks a
throw of the type itself (clice-io/xclang#27, llvm/llvm-project#114075).
The linker may keep that COMDAT, and an exception_ptr copy (use_future,
cobalt's race/promise) is then bitwise: the message is freed twice
(0xC0000374). The asio port helper and tests/cobalt/doc.cpp now check such
throws in a never-called function; composed_4 and cobalt/doc run on Windows
again. (Experiment programs under tests/zz_repro stay until the branch is
cleaned.)

* tests: composed_4's EINVAL text is the system's; experiment: daubechies import order

* tests: math/doc_sf imports math before std; daubechies_scaling runs on Windows

With std imported first, clang merges MSVC's ppltasks from the std module
and the math module's global fragment so that the call_once lambda of
_GetStaticAmbientSchedulerRef writes a second copy of the function's static
(the symbols differ only by LLVM's .1 suffix); std::async, which
daubechies_scaling uses, then reads a null scheduler. The other import order
does not hit it (llvm 22.1.8 and 23.1.3). The experiment programs are
dropped; the workflow now runs the five programs in full.

* docs: windows-llvm-msvc crashes record; clang-msvc module caveats; drop the experiment

The record (.agents/docs/2026-11-18-windows-msvc-module-crashes-analysis.md)
gives the evidence for both clang defects and the workarounds; the open
issue becomes a follow-up to remove them once clang is fixed. docs/usage
section 5 tells consumers about both. The Windows experiment workflow and
its driver are removed (they live in this branch's history).

* math: ooura_fourier_cos NaN on aarch64 Linux (musl ld128 libm + upstream loop guard) (ZheFeng7110#2)

* math: ooura_fourier_cos stops at a non-finite little-node weight

ooura_fourier_cos<double> returned NaN (result and error estimate) on the
linux-gcc-arm64 leg. The leg's C library is musl, whose 113-bit expl,
expm1l and log1pl just call the double versions. On the last little node
of each level exp(-eta) is about 1e450: with a full-range long double the
node and weight both underflow to 0 in double and the loop ends; with
musl it overflows to inf, phi_prime is NaN and the node is 0, which the
cosine loop (it only stops at a negative node, the sine one at node <= 0
or NaN) accepted, so f(0)*NaN poisoned every estimate.

An upstream bug, not a wrapper one: a plain-include program on x86_64
with float128 nodes and double exp/expm1/log1p reproduces it, and
libquadmath's functions do not. patches/math.patch makes the loop stop
at a non-finite weight (the true weight there has already underflowed);
the 113-bit skip in tests/math/doc_numerics.cpp is removed and the open
issue is closed.

* ci(experiment): plain-include ooura_fourier_cos on native aarch64 musl

Experiment only; dropped before merging.

* ci(experiment): also run the ooura musl experiment on push

* trigger ci

* ci(experiment): run the ooura musl build in docker run alpine

JavaScript actions cannot run in an Alpine job container on arm64 runners.

* docs(agents): ooura_fourier_cos NaN confirmed on native aarch64 musl; drop the experiment

The plain-include program in alpine 3.22 on ubuntu-24.04-arm returns NaN
with the pristine header and the correct value with patches/math.patch.
The temporary workflow is removed.

* serialization, thread: no declared exports on Windows; tests/dll runs on Windows (ZheFeng7110#3)

* ci(experiment): tests/dll on windows-llvm-msvc, auto-export report

* serialization, thread: no declared exports in a static build on Windows; tests/dll runs on Windows

A DLL whose objects declare any export gets no discovered ones from mcpp's
.def (GNU ld's auto-export has the same rule). The shared package DLL of
tests/dll carried three such exports, none tied to a DLL build of Boost:
thread's LNK4221 placeholder, codecvt_null<wchar_t>'s BOOST_SYMBOL_EXPORT and
serialization's BOOST_DLLEXPORT. Its .def came out empty and every
filesystem/system symbol was undefined at the test programs' link.

* docs: tests/dll on Windows resolved; drop the experiment workflow

* tests: sub-projects reuse the root build as workspace members; mcpp 2026.11.20.1

tests/dll (with its seven plugins) and tests/test/utf become members of the
root workspace. CI runs them from the root with `mcpp test -p <member>` and
the group's features forwarded (`mcpplibs.mwrap.boost/<f>`), so they build in
the root's build directory and reuse the objects and BMIs of `mcpp build`:
10 s + 5 s locally, instead of rebuilding the package (444 s + 471 s on CI).

The reuse needs two mcpp fixes, hence the pin moves 2026.11.5.1 -> 2026.11.20.1:
feature defines ordered by name (2026.11.17.2, mcpp#949) and dev-dependencies
reaching only test units (2026.11.8.1, mcpp#906). The upgrade also brings:

- dependency keys unquoted (`mcpplibs.mwrap.boost = ...`): the quoted dotted
  key is deprecated and refused by --strict; manifests, templates, examples,
  README and usage docs;
- tools/ci/test_template.py: the fixture's MCPP_HOME leaves the working tree
  (a path package is keyed by its tree's digest), the ABI tables are no longer
  linked from the donor home (the new mcpp rewrote and pruned the donor's),
  and the descriptor drops `mcpp = "mcpp.toml"` (matched exactly now).

Design record: .agents/docs/2026-11-20-sub-project-build-reuse-design.md.

* docs(agents): sub-project build reuse record links mcpp#986 (instance directory follows the unit set)

* ci: pull_request path filter matches files under upstream/boost

"upstream/boost" matched only a file of that name, so a pull request that
changed only the vendored tree did not run the tests; push already used
"upstream/boost/**".

* docs: default closure is 51 libraries (conversion; list adds bind, function)

* tests: ex_peer_async bounds and paces retries after a reset before data

* ci: coverage cases are checked against what the built test programs list

* tools: EXTRA_HEADERS comment names libs.json as the source of header sets

* ci: test_template removes the fixture home when install_fixture fails

* math: nonfinite_num_facets.hpp includes boost/config.hpp for BOOST_INLINE_CONSTEXPR (standalone)

* ci: test_coverage reads Boost.Test units that carry a description (name*: text)

* docs(agents): record for the PR #5 review nits and the listing-based coverage check

* cobalt: test and document co_main without main in the module; document geometry's Fusion adapter removal

docs/usage.md §6 (and usage.zh.md) records that the cobalt module leaves
out boost/cobalt/main.hpp and the geometry module leaves out
geometries/adapted/boost_fusion.hpp, with the consumer pattern for each:
include the header before the import. §2.2 states the include-before-import
rule; both pinned compilers reject the reverse order.
tests/cobalt/co_main.cpp is a co_main program built on every leg.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant